<template>
    <div id='entryrequest-index'>
       <loading mode="full" v-if="loading"></loading>
       <h1 class="card-title">
           <span>进件申请记录</span>
       </h1>
       <div class="order-form form-table">
             <div class="form-content">
                <div class="form-item">
                    <div class="form-item__key">借款人</div>
                    <div class="form-item__value">
                        <input type="tel" placeholder="请输入手机号码" v-model='borrower'>
                    </div>
                </div>
                <div class="form-item">
                    <div class="form-item__key">姓名</div>
                    <div class="form-item__value">
                        <input type="text" placeholder="请输入姓名" v-model='borrowerName'>
                    </div>
                </div>
                <div class="form-item">
                    <div class="form-item__key">需求id</div>
                    <div class="form-item__value">
                        <input type="number" placeholder="请输入订单id" v-model='demandId'>
                    </div>
                </div>

                <div class="form-item">
                    <div class="form-item__key">状态</div>
                    <div class="form-item__value" >
                            <select v-model="sort" class="sort">
                                <option value="">全部</option>
                                <option v-for='item in this.bayDay' :value="item">{{item}}</option> 
                                <!-- <option value="2">已取消</option>                          -->
                            </select>
                    </div>
                </div>

                <div class="form-item">
                    <div class="form-item__key">创建时间</div>
                    <div class="form-item__value">
                         <date-picker
                                color='#757575'
                                :placeholder='`选择日期`' v-model='dataStartTime'></date-picker>
                    </div>
                </div>
                <div class="form-item">
                    <div class="form-item__key">结束时间</div>
                    <div class="form-item__value">
                         <date-picker
                                color='#757575'
                                :placeholder='`选择日期`' v-model='dataEndTime'></date-picker>
                    </div>
                </div>

                <div class="form-item">
                    <div class="form-item__key">开始芝麻分</div>
                    <div class="form-item__value">
                        <input type="number" placeholder="请输入芝麻分" v-model='startZmScore'>
                    </div>
                </div>

                 <div class="form-item">
                    <div class="form-item__key">结束芝麻分</div>
                    <div class="form-item__value">
                        <input type="number" placeholder="请输入芝麻分" v-model='endZmScore'>
                    </div>
                </div>

                 <div class="form-item">
                         <div class="form-item__key">排序规则</div>
                         <div class="form-item__value">
                             <select v-model="sort2" class="sort">
                                 <option value="">全部</option>
                                 <option value="1">创建时间由高到低</option>
                                 <option value="2">浏览次数由高到低</option>
                                 <option value="3">交易次数由大到小</option>
                                 <option value="4">交易总金额由大到小</option>
                                 <option value="5">芝麻分由大到小</option>
                             </select>
                        </div>
                 </div>
                           
            </div>
             <div  class="form-button"><span class="form-button__item button" @click='borrowDemanded(1)'>搜索</span></div>
        </div>
         <el-table
                            ref="multipleTable"
                            :data="tableData5"
                            border
                            style="width: 100%"
                            @selection-change="mini">
                            <el-table-column
                            type="selection"
                            >
                            </el-table-column>
                            <el-table-column
                            prop="borrowNo"
                            label="借款申请ID"
                            >
                                <template slot-scope="scope">
                                   <span v-if='scope.row.borrowNo'> {{ scope.row.borrowNo }} </span>
                                   <span v-else>--</span>
                                </template>
                            </el-table-column>
                            <el-table-column
                            prop="mobileC"
                            label="借款人手机"
                            >
                                <template slot-scope="scope">
                                   <span v-if='scope.row.mobile'> {{ scope.row.mobile }} </span>
                                   <span v-else>--</span>
                                </template>
                            </el-table-column>
                            <el-table-column
                            prop="realNameC"
                            label="借款人姓名"
                            >
                                <template slot-scope="scope">
                                   <span v-if='scope.row.realNameC'> {{ scope.row.realNameC }} </span>
                                   <span v-else>--</span>
                                </template>
                            </el-table-column>
                            <el-table-column
                            prop="zmScore"
                            label="芝麻分"
                            >
                                <template slot-scope="scope">
                                   <span v-if='scope.row.zmScore'> {{ scope.row.zmScore }} </span>
                                   <span v-else>--</span>
                                </template>
                            </el-table-column>
                            <el-table-column
                            prop="borrowAmount"
                            label="借款金额"
                            >
                                <template slot-scope="scope">
                                   <span v-if='scope.row.borrowAmount'> {{ scope.row.borrowAmount |Yuan}} </span>
                                   <span v-else>--</span>
                                </template>
                            </el-table-column>
                            <el-table-column
                            prop="buyScore"
                            label="标价"
                            >
                                <template slot-scope="scope">
                                   <span v-if='scope.row.buyScore'> {{ scope.row.buyScore}} </span>
                                   <span v-else>--</span>
                                </template>
                            </el-table-column>
                            <el-table-column
                            prop="id"
                            label="关联的出借ID"
                            >
                                <template slot-scope="scope">
                                   <span v-if='scope.row.id'> {{ scope.row.id}} </span>
                                   <span v-else>--</span>
                                </template>
                            </el-table-column>
                            <el-table-column
                            prop="mobileB"
                            label="出借人手机"
                            >
                                <template slot-scope="scope">
                                   <span v-if='scope.row.mobileB'> {{ scope.row.mobileB}} </span>
                                   <span v-else>--</span>
                                </template>
                            </el-table-column>
                            <el-table-column
                            prop="realNameB"
                            label="出借人姓名"
                            >
                                <template slot-scope="scope">
                                   <span v-if='scope.row.realNameB'> {{ scope.row.realNameB}} </span>
                                   <span v-else>--</span>
                                </template>
                            </el-table-column>
                            <el-table-column
                            prop="createdAt"
                            label="创建时间"
                            >
                                <template slot-scope="scope">
                                   <span v-if='scope.row.createdAt'> {{ timestampToDate(scope.row.createdAt)}} </span>
                                   <span v-else>--</span>
                                </template>
                            </el-table-column>
                            <el-table-column
                            prop="borrowState"
                            label="状态"
                            >
                                <template slot-scope="scope">
                                   <span v-if='scope.row.borrowStateStr'> {{ scope.row.borrowStateStr}} </span>
                                   <span v-else>--</span>
                                </template>
                            </el-table-column>
                            
                            <el-table-column label="操作">
                                    <template slot-scope="scope">
                                        <el-button
                                        size="small"
                                        type="text"
                                        @click="handleEdit(scope.$index, scope.row)"
                                        >查看</el-button>
                                        <!-- <el-button
                                        size="small"
                                        type="text"
                                        @click="handleEdit1(scope.$index, scope.row)"
                                        >改价</el-button> -->
                                    </template>
                            </el-table-column>                
                        </el-table>
                          <!-- <div style="margin-top: 20px">
                                <el-button type="info" @click='littlePrice()'>批量修改价格</el-button>
                          </div> -->
                        <pagination
                            :current-page='python.pageNum'
                            :total-page='python.totalPage'
                            @pageChange='borrowDemanded'></pagination> 
                            <!-- 第一个改价 -->
                        <!-- <modal
                        title="修改价格"
                        :show='changePrice'
                        @close='changePrice=false'
                        cancle-text='取消'
                        confirm-text='确定'
                        @confirm='changerScore'
                        >
                            <div class="form-item">
                                <div class="form-item__key">修改价格</div>
                                <div class="form-item__value">
                                    <input type="text" placeholder="请输入价格" v-model="changePrices">
                                </div>
                            </div>                                            
                        </modal> -->
                        <!-- 批量修改价格 -->
                        <!-- <modal
                        title="批量修改价格"
                        :show='littleChange'
                        @close='littleChange=false'
                        cancle-text='取消'
                        confirm-text='确定'   
                        @confirm='littlePrice2'                    
                        >
                            <div class="form-item">
                                <div class="form-item__key">批量修改价格</div>
                                <div class="form-item__value">
                                    <input type="text" placeholder="请输入价格" v-model="changePrices2">
                                </div>
                            </div>                                     
                        </modal> -->
                        <!-- 查看模态框 -->
                        <modal
                        title="查看详情"
                        :show='watchSee'
                        @close='watchSee=false'
                        cancle-text=''
                        confirm-text=''    
                        reset-text=''          
                        >    
                         <tab-box>
                            <tab name='基本信息'>
                                <h1 class='h1'>
                                            <span class='userMessage'>用户基本信息</span>
                                </h1>
                                <ul>
                                    <li class="result-info__item">
                                            <div class="result-info__key">姓名</div>
                                            <div class="result-info__value">
                                                <span v-if='baseCheck1.realName'>{{baseCheck1.realName}}</span>
                                                <span v-else>--</span>
                                            </div>
                                    </li>
                                    <li class="result-info__item">
                                            <div class="result-info__key">性别</div>
                                            <div class="result-info__value">
                                                <span v-if='baseCheck1.gender'>{{baseCheck1.gender}}</span>
                                                <span v-else>--</span>
                                            </div>
                                    </li>
                                    <li class="result-info__item">
                                            <div class="result-info__key">手机号</div>
                                            <div class="result-info__value">                                               
                                                <span v-if='baseCheck1.mobile'>{{baseCheck1.mobile}}</span>
                                                <span v-else>--</span>
                                            </div>
                                    </li>
                                    <li class="result-info__item">
                                            <div class="result-info__key">身份证</div>
                                            <div class="result-info__value">                                             
                                                 <span v-if='baseCheck1.idNumber'> {{baseCheck1.idNumber}}</span>
                                                 <span v-else>--</span>
                                            </div>
                                    </li>
                                    <li class="result-info__item">
                                            <div class="result-info__key">芝麻分</div>
                                            <div class="result-info__value">
                                                <span v-if='baseCheck1.zmScore'>{{baseCheck1.zmScore}}</span>
                                                <span v-else>--</span>                                              
                                            </div>
                                    </li>
                                    <li class="result-info__item">
                                            <div class="result-info__key">使用设备</div>
                                            <div class="result-info__value">
                                               <span v-if='baseCheck1.loginDevice'>{{baseCheck1.loginDevice}}</span>
                                               <span v-else>--</span>
                                            </div>
                                    </li>
                                    <li class="result-info__item">
                                            <div class="result-info__key">所在城市</div>
                                            <div class="result-info__value">
                                                 <span v-if='baseCheck1.mainArea'> {{baseCheck1.mainArea}}</span>
                                                 <span v-else>--</span>
                                            </div>
                                    </li>
                                    <li class="result-info__item">
                                            <div class="result-info__key">信用报告</div>
                                            <div class="result-info__value">
                                                 <span v-if='baseCheck1.isCreditReport'> {{baseCheck1.isCreditReport}}</span>
                                                 <span v-else>--</span>
                                            </div>
                                    </li>
                                    <li class="result-info__item">
                                            <div class="result-info__key">发布求借需求次数</div>
                                            <div class="result-info__value">
                                                 <span v-if='baseCheck1.fbDemandNum'> {{baseCheck1.fbDemandNum}}</span>
                                                 <span v-else>--</span>                         
                                            </div>
                                    </li>
                                    <li class="result-info__item">
                                            <div class="result-info__key">出售中求借次数</div>
                                            <div class="result-info__value">
                                                 <span v-if='baseCheck1.csDemandNum'> {{baseCheck1.csDemandNum}}</span>
                                                 <span v-else>--</span>                         
                                            </div>
                                    </li>  
                                </ul>
                                <h1 class='h1'>
                                            <span class='userMessage'>借款需求信息</span>
                                </h1>
                                <ul>
                                    <li class="result-info__item">
                                            <div class="result-info__key">需求状态</div>
                                            <div class="result-info__value">
                                                <span v-if='baseCheck1.borrowState'>{{tranLateOne(baseCheck1.borrowState)}}</span>
                                                <span v-else>--</span>
                                            </div>
                                    </li>
                                    <li class="result-info__item">
                                            <div class="result-info__key">借款用途</div>
                                            <div class="result-info__value">
                                                <span v-if='baseCheck1.borrowUsage'>{{baseCheck1.borrowUsage}}</span>
                                                <span v-else>--</span>
                                            </div>
                                    </li>
                                    <li class="result-info__item">
                                            <div class="result-info__key">借款备注</div>
                                            <div class="result-info__value">
                                                <span v-if='baseCheck1.addSay'>{{baseCheck1.addSay}}</span>
                                                <span v-else>--</span>
                                            </div>
                                    </li>
                                    <li class="result-info__item">
                                            <div class="result-info__key">借款金额</div>
                                            <div class="result-info__value">
                                                <span v-if='baseCheck1.borrowAmount'>{{baseCheck1.borrowAmount}}</span>
                                                <span v-else>--</span>
                                            </div>
                                    </li>
                                    <li class="result-info__item">
                                            <div class="result-info__key">创建时间</div>
                                            <div class="result-info__value">
                                                <span v-if='baseCheck1.createdAt'>{{timestampToDate(baseCheck1.createdAt)}}</span>
                                                <span v-else>--</span>
                                            </div>
                                    </li>
                                    <li class="result-info__item">
                                            <div class="result-info__key">取消时间</div>
                                            <div class="result-info__value">
                                                <span v-if='baseCheck1.borrowAt'>{{timestampToDate(baseCheck1.borrowAt)}}</span>
                                                <span v-else>--</span>
                                            </div>
                                    </li>
                                    <li class="result-info__item">
                                            <div class="result-info__key">浏览次数／交易次数</div>
                                            <div class="result-info__value">
                                                <span v-if='baseCheck1.browseCount'>{{baseCheck1.browseCount}}</span>
                                                <span v-else>--</span>
                                                <span v-if='baseCheck1.buyCount'>{{baseCheck1.buyCount}}</span>
                                                <span v-else>--</span>
                                            </div>
                                    </li>
                                    <li class="result-info__item">
                                            <div class="result-info__key">交易总金额(点券)</div>
                                            <div class="result-info__value">
                                                <span v-if='baseCheck1.consumeScore'>{{baseCheck1.consumeScore}}</span>
                                                <span v-else>--</span>
                                            </div>
                                    </li>
                                    <li class="result-info__item">
                                            <div class="result-info__key">标价</div>
                                            <div class="result-info__value">
                                                <span v-if='baseCheck1.buyScore'>{{baseCheck1.buyScore}}</span>
                                                <span v-else>--</span>
                                            </div>
                                    </li>
                                </ul>
                            </tab>
                            <tab name='交易记录'>
                                    <table  width="100%">
                                        <thead class="table-list__head">
                                            <tr style='background:#ddd;'>
                                                <th width='25%'>放贷人手机</th>
                                                <th width='25%'>姓名</th>
                                                <th width='25%'>时间</th>
                                                <th width='25%'>价格</th>
                                            </tr>
                                        </thead>
                                        <tbody class='table-list__body have-border'>
                                            <tr v-for='item in orderBaby'>
                                                <td>
                                                    <span v-if='item.lendPhone'>{{item.lendPhone}}</span>
                                                    <span v-else>--</span>                                                   
                                                </td>
                                                <td>
                                                    <span v-if='item.lendName'>{{item.lendName}}</span>
                                                    <span v-else>--</span>                                                   
                                                </td>
                                                <td>
                                                    <span v-if='item.createTime'>{{timestampToDate(item.createTime)}}</span>
                                                    <span v-else>--</span>                                                   
                                                </td>
                                                <td style='text-align:center'>
                                                    <span v-if='item.consumeScore'>{{item.consumeScore}}</span>
                                                    <span v-else>--</span>                                                   
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                     <pagination
                                        :current-page='mountBy.pageNum'
                                        :total-page='mountBy.totalPage'
                                        @pageChange='orderList'></pagination> 
                            </tab>
                            <tab name='定价记录'>
                                <table  width="100%">
                                        <thead class="table-list__head">
                                            <tr style='background:#ddd;'>
                                                <th width='25%'>价格</th>
                                                <th width='25%'>操作人</th>
                                                <th width='25%'>时间</th>
                                            </tr>
                                        </thead>
                                        <tbody class='table-list__body have-border'>
                                            <tr v-for='item in scoreRecordBlack'>
                                                <td style='text-align:center'>
                                                    <span v-if='item.score'>{{item.score}}</span>
                                                    <span v-else>--</span>                                                   
                                                </td>
                                                <td style='text-align:center'>
                                                    <span v-if='item.sysUserName'>{{item.sysUserName}}</span>
                                                    <span v-else>--</span>                                                   
                                                </td>
                                                <td style='text-align:center'>
                                                    <span v-if='item.createTime'>{{item.createTime | timestampToDate}}</span>
                                                    <span v-else>--</span>                                                   
                                                </td>     
                                            </tr>
                                        </tbody>
                                    </table>
                                    <template v-if='this.scoreRecordBlack.length==0'>
                                        <transition>
                                            <p class='no-style'>无数据显示</p>
                                        </transition>
                                    </template>
                                    
                                    <pagination
                                        :current-page='scoreRecordBlack1.pageNum'
                                        :total-page='scoreRecordBlack1.totalPage'
                                        @pageChange='scoreRecord'></pagination> 
                            </tab>
                        </tab-box>                            
                        </modal>

                        

    </div>
</template>

<script>
    import {Promise} from 'es6-promise'
    import footerBar from '../components/FooterBar.vue'
    import selectGroup from '../components/SelectGroup.vue'
    import selectOption from '../components/SelectOption.vue'
    import radioGroup from '../components/RadioGroup.vue'
    import datePicker from '../components/DatePicker.vue'
    import areaSelect from '../components/AreaSelect.vue'
    import radio from '../components/Radio.vue'
    import loading from '../components/Loading.vue'
    import tabBox from '../components/TabBox.vue'
    import tab from '../components/Tab.vue'
    import checkBox from '../components/CheckBox.vue'
    import checkBoxGroup from '../components/CheckBoxGroup.vue'
    import toolTip from '../components/ToolTip.vue'
    import modal from '../components/Modal.vue'
    import confirm from '../components/Confirm.vue'
    import buttonLoading from '../components/ButtonLoading.vue'
    import pagination from '../components/Pagination.vue'
    import dateFormat from '../filters/filter-dateFormat'
    import toYuan from '../filters/filter-toYuan'
    import  {mapGetters, mapActions}  from 'vuex'
    import {addLenderValidation, resetAccountPasswordValidation, operatorEditValidation} from '../validation/validation'
    import {allApi, lenderApi} from '../api/api'
    import moment from 'moment'
    export default {
        components:{
            footerBar,
            selectGroup,
            selectOption,
            radioGroup,
            tabBox,
            tab,
            radio,
            checkBox,
            checkBoxGroup,
            areaSelect,
            loading,
            toolTip,
            modal,
            confirm,
            buttonLoading,
            pagination,
            datePicker,
        },
        filters: {
            dateFormat,
            toYuan,
            booleanToStr(boolean){
                if (boolean === true) {
                return '是'
                }
                else {
                return '否'
                }
            },
            Yuan(yuan){
                if (!yuan) return this.placeholder
                return yuan/100+'.00'
                },
            timestampToDate(timestamp){
                if (!timestamp) return this.placeholder
                return moment(timestamp).format('YYYY-MM-DD HH:mm:ss')
                },
        },
        data() {
            return {
                borrower:'',
                borrowerName:'',
                demandId:'',
                sort:'',
                dataStartTime:'',
                dataEndTime:'',
                startZmScore:'',
                endZmScore:'',
                sort2:'',
                tableData5: [],
                multipleSelection:[],
                python:[],
                Array:[],
                bayDay:[],
                loading:true,
                changePrice:false,
                changePrices:'',
                changePrices2:'',
                gaijia:'',
                littleChange:false,
                watchSee:false,
                curIndex:'',
                baseCheck1:[],
                borrowNumber:'',
                orderBaby:[],
                mountBy:[],
                userBorrowId:'',
                scoreRecordBlack:[],
                scoreRecordBlack1:[],
                userId:[]


            }
        },
        computed:{
             ...mapGetters([
                            'msgTip',
                            'localInfo'
                        ]),
            replayChange(){
                let records =  _.filter(this.multipleSelection,(value,index)=>{
                      return value!==undefined&&value!==null
                     })
                 let k=[]
                    _.each(records,(value,index)=>{
                        k.push(value.borrowNo)
                    })
                 return k.join()
            },
              tranLate(){
                if(this.sort=='出售中'){
                    return 'WAIT_BORROW'
                }else if(this.sort=='已取消'){
                    return 'BORROW_CLOSED'
                }else{
                    
                }
            }
        },
        methods:{
        ...mapActions([
                'showLoading',
                'hideLoading',
                'setMsgTip'
            ]),
        tranLateOne(){
                if(this.baseCheck1.borrowState=='WAIT_BORROW'){
                    return '出售中'
                }else if(this.baseCheck1.borrowState=='BORROW_CLOSED'){
                    return '已取消'
                }
            },
        timestampToDate(timestamp){
                if (!timestamp) return this.placeholder
                return moment(timestamp).format('YYYY-MM-DD HH:mm:ss')
                },
        mini(val){
                this.multipleSelection=val;
            },
         borrowDemanded(num){
              this.loading = true
                allApi.findAllInputPieceApplyManage(
                    {
                        mobile:this.borrower,
                        name:this.borrowerName,
                        demandId:this.demandId,
                        borrowState:this.tranLate,
                        startTime:this.dataStartTime,
                        StartZmScore:this.startZmScore,
                        endTime:this.dataEndTime,
                        endZmScore:this.endZmScore,
                        rank:this.sort2,
                        pageSize:10,
                        pageNum:num
                    }
                )
                .then(result => {
                  this.tableData5=result.list
                  this.python=result
                    console.log('111')
                     this.loading= false
                 
                    //  console.log(records)
                    
                })
                .catch(error => {
                  this.loading = false
                    console.error(error)
                })
            }, 
            borrowNeed(num){
            //   this.loading = true
                allApi.borrowNeed(
                        {}
                )
                .then(result => {
                    console.log('111')
                    this.Array=result
                let records =  _.filter(this.Array,(value,index)=>{
                      return value!==undefined&&value!==null
                     })
                _.each(records,(value,index)=>{
                    if(value==null){
                        value=''
                    }
                    if(value){
                     if(this.bayDay.indexOf(value) == -1){  //判断在s数组中是否存在，不存在则push到s数组中
                             this.bayDay.push(value);
                          }
                    }                     
                })
                    
                })
                .catch(error => {
                //   this.loading = false
                    console.error(error)
                })
            }, 
           handleEdit(index, row) {
                // console.log(index, row);
                this.watchSee=true
                this.curIndex=row.borrowUserId
                this.borrowNumber=row.borrowNo
                this.userBorrowId=row.userId
                console.log(this.userBorrowId+0)
                 this.baseCheck()
                  this.orderList(1)
                  this.scoreRecord(1)
                // this.$router.push({
                //      name:'watch-index',
                //      params:{
                //          id:row.borrowUserId
                //      }
                // })
                
            },
        //    handleEdit1(index, row) {
        //         // console.log(index, row.borrowNo);
        //         this.gaijia=row.borrowNo
        //         this.changePrice=true
        //     },
         changerScore(){
            //   this.loading = true
                allApi.changerScore({
                    borrowNos:this.gaijia,
                    newScore:this.changePrices
                })
                .then(result => {
                    // console.log('111')
                     this.setMsgTip({
                            text: '改价成功',
                            type: 'success'
                        })  
                     this.changePrice=false
                     this.borrowDemanded(this.python.pageNum)
                     })
                .catch(error => {
                //   this.loading = false
                    console.error(error)
                })
            }, 
            littlePrice(){
                this.littleChange=true
                // replayChange           
            },
            littlePrice2(){
                    allApi.changerScore({
                    borrowNos:this.replayChange,
                    newScore:this.changePrices2
                })
                .then(result => {
                    // console.log('111')
                     this.setMsgTip({
                            text: '批量改价成功',
                            type: 'success'
                        })  
                        this.littleChange=false
                        this.borrowDemanded(this.python.pageNum)
                    
                     })
                .catch(error => {
                //   this.loading = false
                    console.error(error)
                })
            },
            //new jiekou
             baseCheck(){
                  allApi.baseCheck({
                      userId:this.userBorrowId,
                      borrowNo:this.borrowNumber
                })
                .then(result => {
                    // console.log('111')
                    
                    this.baseCheck1=result 
                     })
                .catch(error => {
                    console.error(error)
                })
            },
            orderList(num){
                  allApi.orderList({
                      borrowNo:this.borrowNumber,
                      pageSize:10,
                      pageNo:num
                })
                .then(result => {
                    // console.log('111')
                   this.orderBaby=result.pageInfo.records
                   this.mountBy=result.pageInfo
                     })
                .catch(error => {
                    console.error(error)
                })
            },
             scoreRecord(num){
                  allApi.scoreRecord({
                      userId:this.userBorrowId,
                      pageSize:6,
                      pageNo:num
                })
                .then(result => {
                    // console.log('111')
                    this.scoreRecordBlack=result.records
                    this.scoreRecordBlack1=result
                     })
                .catch(error => {
                    console.error(error)
                })
            }
        },
        created(){
            this.borrowDemanded(1)
            this.borrowNeed()
            // this.changerScore()
        },
    }
</script>

<style lang="scss">
    @import "../sass/variables";
    @import "../sass/extends";
    @import "../sass/mixins";
    #entryrequest-index{
        width:90%;
        .el-button--text {
            color: #13ce66;
        }
        .el-button--text:hover{
            color: #1d90e6;
        }
         .el-button--text:focus{
            color: #5185ad;
        }
        .colorRight{
            font-weight:normal;
            color:red;
        }
        .h1{
            text-align:center;
            border:1px solid #ddd;
            background-color:#ddd;
        }
        .userMessage{
            font-size:15px;
            font-weight:normal;
            line-height:32px;
            color:black;
        }
         .table-list__head th,  .table-list__head td{
             text-align:center;
         }
         .no-style{
             text-align:center;
             margin: 10px 0;
             padding-top:20px;
         }
        
    }
</style>